package cn.clementine.core.api;

import cn.clementine.core.vo.Result;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CustomErrorController implements ErrorController {

    @RequestMapping("/error")
    public Result handleError() {
        return Result.fail("可惜的是出错了！请联系管理员！实在不行找作者！");
    }
    public String getErrorPath() {
        return "/error";
    }
}